//
// Created by hkkzzxz on 24-8-31.
//

#ifndef YUNSHI_UNDERLYINGSERVER_H
#define YUNSHI_UNDERLYINGSERVER_H

// http服务器类

#include "HttpConnection.h"

class UnderlyingServer {
public:
    //启动服务器
    void start(int &serverPort);

private:
    //异步TCP服务器用于处理http请求
    void httpServer(tcp::acceptor &acceptor, tcp::socket &socket);

    LogManager *logManager = LogManager::getInstance();
    std::shared_ptr<spdlog::logger> consoleLogger = logManager->getConsoleLogger();
    std::shared_ptr<spdlog::logger> fileLogger = logManager->getFileLogger();
};


#endif //YUNSHI_UNDERLYINGSERVER_H
